<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var num = -100;
        console.log(num);
        console.log(Math.abs(num));//100

        console.log(Math.max(10,30,20,56,34));//56
        console.log(Math.min(10,30,20,56,34));//10

        //10.4  10   11
        var num1 = 10.4;
        console.log(Math.floor(num1));//10
        console.log(Math.ceil(num1));//11
        //Math.random()   >=0   <1
        console.log(Math.random());
        //10,20之间的随机数
        function getRandom(min,max){
            var result = Math.random() * (max - min) + min;
            result1 = Math.floor(result)
            return result1;
        }
        console.log(getRandom(10,20));
        
        
        
        


    </script>
</body>
</html>